package net.zjitc.object.shape;

/**
 * @Author admin
 * @Date 2019/3/20 9:36
 */
public class ShapeFactory {

    public static Shape getShape(int a) {
        if(a==1){
            return new Circle("圆形");
        }else if(a==2){
            return new Rectangle("长方形");
        }else if(a==3){
            return new Triangle("三角形");
        }else{
//            return new Shape("图形");
            return null;
        }
    }
}
